#include <QCoreApplication>
#include <QDir>
#include <QProcess>
#include <QThread>
#include <QDebug>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    QProcess* proc = new QProcess(&a);

    QDir dir(QFileInfo(QCoreApplication::applicationFilePath()).absoluteDir());

    //qDebug() <<
        QDir::setCurrent(dir.path());

    //dir.cdUp();
    proc->start("cc.exe");
    if (proc->waitForStarted()) {
        proc->waitForFinished(-1);
        //qDebug() << "ExitCode" << proc->exitCode();
    }
    else {
        qDebug() << proc->errorString();
    }

    ::exit(0);

    return a.exec();
}
